Skip to content

Support custom grounding workflows - #438

Merged
cthoyt merged 6 commits into
mainfrom
add-direct-grounder
Sep 15, 2025
Merged

Support custom grounding workflows#438
cthoyt merged 6 commits into
mainfrom
add-direct-grounder

Conversation

@cthoyt

@cthoyt cthoyt commented Sep 15, 2025

Copy link
Copy Markdown
Member

This PR adds a convenience function for creating a grounder from a pre-constructed ontology. It also adds documentation to support @gouttegd's use cases described in https://incenp.org/notes/2025/comparing-python-ontology-libraries.html.

Ultimately, though, his blog post is correct in that PyOBO's goal is to provide downstream user access to the most up-to-date versions of the ontologies more than support local/custom ontology usage.

@gouttegd

Copy link
Copy Markdown

Thanks! Once this makes it into a release I’ll update my post accordingly.

PyOBO's goal is to provide downstream user access to the most up-to-date versions of the ontologies more than support local/custom ontology usage

Fair enough. After all an ontology has (hopefully!) more users than editors, so it’s understandable to cater more for the needs of the formers than the laters. :)

@cthoyt
cthoyt merged commit b2ff4af into main Sep 15, 2025
10 checks passed
@cthoyt
cthoyt deleted the add-direct-grounder branch September 15, 2025 08:05
@cthoyt

cthoyt commented Sep 15, 2025

Copy link
Copy Markdown
Member Author

@cthoyt

cthoyt commented Sep 15, 2025

Copy link
Copy Markdown
Member Author

all that being said, I think the reason for the slowdown is 1) bioregistry takes a long time to load these days, I would like to improve its caching and 2) identifier standardization happens in the background, which is beyond what the other OBO parsers do (and takes some extra time)

@gouttegd

Copy link
Copy Markdown

I think the reason for the slowdown is 1) bioregistry takes a long time to load these days, I would like to improve its caching and 2) identifier standardization happens in the background, which is beyond what the other OBO parsers do (and takes some extra time)

For what it’s worth, I observed that obonet.read_obo (used under the hood by pyobo.from_obo_path) can read FBbt in about 3 to 4 seconds if I recall correctly, so indeed it seems that most of the total time taken by PyOBO to “read“ FBbt (~45 seconds) is spent doing post-parsing, PyOBO-specific stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants